﻿<UserControl
	x:Class="MVVMtutorial.Dialog2"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:me="clr-namespace:MVVMtutorial"
	mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="400"
>
	<UserControl.DataContext>
		<me:Dialog2ViewModel />
	</UserControl.DataContext>

	<Border Background="MistyRose">
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="30" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="140" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>

			<TextBlock Text="Dialog2" />

			<TextBlock Text="PrivateData" Grid.Row="1" />
			<TextBox
				Text="{Binding PrivateData, Mode=TwoWay}"
				Grid.Row="1"
				Grid.Column="1"
			/>

			<TextBlock Text="ExchangeData" Grid.Row="2" />
			<TextBox
				Text="{Binding ExchangeData, Mode=TwoWay}"
				Grid.Row="2"
				Grid.Column="1"
			/>

			<Button 
				Content="Notify MainPage" 
				Command="{Binding CommandNotifyMain}" 
				Grid.Row="3" Grid.Column="1"
			/>

			<TextBlock Text="CallBack from MainPage" Grid.Row="4" />
			<TextBox
				Text="{Binding CallBackData, Mode=TwoWay}"
				Grid.Row="4"
				Grid.Column="1"
			/>			
		</Grid>
	</Border>
</UserControl>
